package com.whimscrew.user.service;

import com.whimscrew.user.config.FeignConfig;
import com.whimscrew.user.model.Video;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

//对应Eureka注册的视频服务名称
@FeignClient(value = "video",configuration = {FeignConfig.class})
public interface VideoService {


    /**
     * 查看用户已上传的视频列表
     * @param userId 用户id
     * @return  List<Video>,视频列表
     */
    @GetMapping("/v1/video/uploads/{userId}")
    List<Video> uploadList(@PathVariable("userId") Long userId);

}
